Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(otel): Export & use spanTimeInputToSeconds for otel span exporter #12699

Merged
merged 2 commits into from
Jul 4, 2024

Conversation

onurtemizkan
Copy link
Collaborator

Adds support for cases where the time from OTEL is just a number in milliseconds instead of tuples.

Fixes: #12697 (Can't reproduce the issue but from the context of the report, this should resolve it)

@onurtemizkan onurtemizkan requested a review from mydea June 28, 2024 16:16
Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test for this? Seems really weird that this has this behaviour.

@onurtemizkan
Copy link
Collaborator Author

Yes, and I just realised that the PR is also incomplete, we need to detect if it's in milliseconds or seconds. In the issue it's in milliseconds.

@mydea
Copy link
Member

mydea commented Jul 1, 2024

Can we instead just export spanTimeInputToSeconds from @sentry/core and use this? This already has all the different scenarios and should handle them correctly?

@onurtemizkan
Copy link
Collaborator Author

Can we instead just export spanTimeInputToSeconds from @sentry/core and use this? This already has all the different scenarios and should handle them correctly?

Oh I wasn't aware of that! Updating the PR.

@onurtemizkan onurtemizkan force-pushed the onur/support-otel-number-timestamps branch from d73b071 to ae4a0f2 Compare July 1, 2024 10:11
Copy link
Contributor

github-actions bot commented Jul 1, 2024

size-limit report 📦

Path Size
@sentry/browser 22.22 KB (0%)
@sentry/browser (incl. Tracing) 33.38 KB (0%)
@sentry/browser (incl. Tracing, Replay) 69.16 KB (0%)
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.49 KB (0%)
@sentry/browser (incl. Tracing, Replay with Canvas) 73.22 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) 85.82 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback, metrics) 87.68 KB (0%)
@sentry/browser (incl. metrics) 26.5 KB (0%)
@sentry/browser (incl. Feedback) 38.86 KB (0%)
@sentry/browser (incl. sendFeedback) 26.84 KB (0%)
@sentry/browser (incl. FeedbackAsync) 31.45 KB (0%)
@sentry/react 24.97 KB (0%)
@sentry/react (incl. Tracing) 36.43 KB (0%)
@sentry/vue 26.33 KB (0%)
@sentry/vue (incl. Tracing) 35.24 KB (0%)
@sentry/svelte 22.36 KB (0%)
CDN Bundle 23.42 KB (0%)
CDN Bundle (incl. Tracing) 35.12 KB (0%)
CDN Bundle (incl. Tracing, Replay) 69.25 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) 74.45 KB (0%)
CDN Bundle - uncompressed 68.8 KB (0%)
CDN Bundle (incl. Tracing) - uncompressed 103.82 KB (0%)
CDN Bundle (incl. Tracing, Replay) - uncompressed 214.29 KB (0%)
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 227 KB (0%)
@sentry/nextjs (client) 36.3 KB (0%)
@sentry/sveltekit (client) 34.02 KB (0%)
@sentry/node 130.61 KB (-0.01% 🔽)
@sentry/node - without tracing 91.62 KB (-0.03% 🔽)
@sentry/aws-serverless 116.8 KB (-0.02% 🔽)

@onurtemizkan onurtemizkan force-pushed the onur/support-otel-number-timestamps branch from ae4a0f2 to 9da19ec Compare July 1, 2024 10:28
@mydea mydea changed the title feat(otel): Add support for non-tuple OTEL time. feat(otel): Export & use spanTimeInputToSeconds for otel span exporter Jul 1, 2024
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! I adjusted the PR name to match what it now does :) Still weird why this is happening, as the types are pretty clear in what should happen, but does not hurt to be extra safe here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error on span using sentry-opentelemetry
3 participants